home *** CD-ROM | disk | FTP | other *** search
- #include <midi.h>
-
- /**************************************************************
- *
- * NOTIMTAB.PIF
- *
- **************************************************************/
-
- /******* access to note time table via the following structure *************/
-
- typedef event NOTE ;
- #define _ON_ 0x80 /* internal representation of "note on" */
- typedef long TIME ;
-
- typedef struct
- {
- TIME time ; /* absolute time of event (element) */
- int reference ; /* pointer to corresponding note on/off event */
- unsigned char dynamic ; /* note on dynamic or note off dynamic */
- NOTE note ; /* bit7 = 0 note off; bit7 = 1 note on */
- unsigned char channel ; /* origination channel of event */
- }
- NOTE_TIME_TABLE_ELEMENT ;
-
-
- /********************************************************************
- */
- unsigned int fill_note_time_table
- (
- unsigned char *track_address, /* IN: pointer to a track in a MIDI file */
- long track_length, /* IN: in bytes */
- NOTE_TIME_TABLE_ELEMENT *first_element, /* OUT: note time table */
- long *elements_generated, /* OUT: elems. filled into note time table */
- unsigned int *channels, /* OUT: mask indicating non-empty channels */
- NOTE *min_note, NOTE *max_note, /* OUT: lowest and highest note of the track */
- char *trackname, /* OUT: track name */
- int max_text_length /* IN: max. length of track name */
- ) ;
- /*
- * Transforms the data of a
- * MIDI standard file into a fast access data structure for
- * further processing.
- *
- * RETURN:
- */
- #define note_time_table_filled 10
- #define wrong_event_found 11
- #define data_without_status_given 12
- #define next_data_overflow 13
- #define no_var_length_number 14
- /*
- ********************************************************************/
-
-
- /*******************************************************************
- */
- NOTE_TIME_TABLE_ELEMENT *get_element
- (
- NOTE_TIME_TABLE_ELEMENT *first_element, /* IN: start position */
- unsigned long number , /* IN: number of elements after
- first element to look on */
- TIME time /* IN: nominal time of element */
- ) ;
- /*
- * Searches the one element in a note time table
- * which possesses a time that is as near as possible
- * to the input time and higher than the input time.
- * The first element with this fewest possible or equal time
- * is returned if more elements have the same time.
- *
- * RETURN: pointer to the element found, or NULL (if only
- * elements with lower times exist in the specified range)
- *
- *******************************************************************/
-